package com.cmwa.solution.sys.msg.vo;

import org.apache.velocity.VelocityContext;

public class ManualOperationParamsVo {
	public static final String SENDTIME_NOW = "NOW";
	public static final String SENDTIME_NOW_ASYN = "ASYN";
	public static final String SENDTIME_LATER = "LATER";

	public static final String SUBTYPE_QXTZ001 = "QXTZ001"; // 数据权限赋权异常通知
	public static final String SUBTYPE_DR001 = "DR001";
	
	/**
	 * 任务ID
	 */
	private String taskId;
	/**
	 * 附件id
	 */
	private String attIds;
	/**
	 * 来源ID
	 */
	private String sourceId;
	/**
	 * 来源类型
	 */
	private MsgSourceType sourceType;
	
	
	private String empId = "";
	private String msgCode = "";
	private String sendTime = "";
	private String sendTimeAsyn = "";
	public String emailAddress = "";// 收件人邮箱地址
	public String sendTo = "";// 收件人邮箱
	public String sendToEmpIds = "";// 收件人empid
	private String reportType;// 服务报告类型
	private VelocityContext dataSource;// 使用Velocity的数据源

	// TODO:由于原来的设计问题为了满足条件强制开的一个参数缺口
	// 收件人是否是第三方（非系统人员）
	private boolean thirdReceiver = false;
	// 配置的第三方发件人
	private String thirdAddressor = null;

	private String nickName = null;

	private static String[] INNER_MAIL_SUFFIX_ARR = { "@cmfchina.com", "@cmwachina.com" };

	public ManualOperationParamsVo() {
	}

	public static boolean isInnerMail(String mail) {
		for (String suffix : INNER_MAIL_SUFFIX_ARR) {
			if (mail.endsWith(suffix)) {
				return true;
			}
		}
		return false;
	}

	public String getEmpId() {
		return empId;
	}

	public void setEmpId(String empId) {
		this.empId = empId;
	}

	public String getMsgCode() {
		return msgCode;
	}

	public void setMsgCode(String msgCode) {
		this.msgCode = msgCode;
	}

	public String getSendTime() {
		return sendTime;
	}

	public void setSendTime(String sendTime) {
		this.sendTime = sendTime;
	}

	public String getSendTimeAsyn() {
		return sendTimeAsyn;
	}

	public void setSendTimeAsyn(String sendTimeAsyn) {
		this.sendTimeAsyn = sendTimeAsyn;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getSendTo() {
		return sendTo;
	}

	public void setSendTo(String sendTo) {
		this.sendTo = sendTo;
	}

	public String getReportType() {
		return reportType;
	}

	public void setReportType(String reportType) {
		this.reportType = reportType;
	}

	public boolean isThirdReceiver() {
		return thirdReceiver;
	}

	public void setThirdReceiver(boolean thirdReceiver) {
		this.thirdReceiver = thirdReceiver;
	}

	public String getThirdAddressor() {
		return thirdAddressor;
	}

	public void setThirdAddressor(String thirdAddressor) {
		this.thirdAddressor = thirdAddressor;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public VelocityContext getDataSource() {
		return dataSource;
	}

	public void setDataSource(VelocityContext dataSource) {
		this.dataSource = dataSource;
	}

	public String getSendToEmpIds() {
		return sendToEmpIds;
	}

	public void setSendToEmpIds(String sendToEmpIds) {
		this.sendToEmpIds = sendToEmpIds;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getAttIds() {
		return attIds;
	}

	public void setAttIds(String attIds) {
		this.attIds = attIds;
	}

	public String getSourceId() {
		return sourceId;
	}

	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}

	public MsgSourceType getSourceType() {
		return sourceType;
	}

	public void setSourceType(MsgSourceType sourceType) {
		this.sourceType = sourceType;
	}
}
